package frontend.parser.syntaxtree;

import frontend.lexer.TKType;
import frontend.parser.syntaxtree.symbol.NonTerminalSymbol;
import frontend.parser.syntaxtree.symbol.TerminalSymbol;

import java.util.function.Consumer;

/**
 * 字符串常量初始化
 *
 * @author 杨凯伟
 * @date 2024/10/14
 */
public class ConstInitValNodeForStringCon extends ConstInitValNode {
    public String stringConst;

    @Override
    public void walk(Consumer<TerminalSymbol> terConsumer, Consumer<NonTerminalSymbol> nonTerConsumer) {
        terConsumer.accept(new TerminalSymbol(TKType.STRCON, stringConst));

        nonTerConsumer.accept(new NonTerminalSymbol(this));
    }
}